<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="150px">
      <el-form-item label="所属类别" prop="CategoryName">
        <el-input
          v-model="queryParams.CategoryName"
          placeholder="请输入所属类别"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="形体名称" prop="CnName">
        <el-input
          v-model="queryParams.CnName"
          placeholder="请输入形体名称"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="款号" prop="GoodsNo">
        <el-input
          v-model="queryParams.GoodsNo"
          placeholder="请输入款号"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="部门" prop="deptName">
        <el-input
          v-model="queryParams.deptName"
          placeholder="请输入部门"
          clearable
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
<!--      <el-form-item label="样品单号" prop="YPbillno">-->
<!--        <el-input-->
<!--          v-model="queryParams.YPbillno"-->
<!--          placeholder="请输入样品单号"-->
<!--          clearable-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="下单日期" prop="SampleStartDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.SampleStartDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择下单日期">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="接收日期" prop="RECDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.RECDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择接收日期">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="预计制单下发" prop="PLanXF">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.PLanXF"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择预计制单下发">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="实际制单下发" prop="ACTXF">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.ACTXF"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择实际制单下发">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="业务下发资材日期" prop="ZCDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.ZCDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择业务下发资材日期">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="预计寄出日期_品质样" prop="PlanSendDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.PlanSendDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择预计寄出日期_品质样">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="实际寄出日期_品质样" prop="ACTQRDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.ACTQRDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择实际寄出日期_品质样">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="预计寄出日期_色样" prop="SYPlanDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.SYPlanDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择预计寄出日期_色样">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="实际寄出日期_色样" prop="SYACTDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.SYACTDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择实际寄出日期_色样">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="预计寄出日期_面料" prop="PlanFDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.PlanFDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择预计寄出日期_面料">-->
<!--        </el-date-picker>-->
      </el-form-item>
      <el-form-item label="实际寄出日期_面料" prop="ACTFDate">
        <el-date-picker clearable
          v-model="queryParams.ACTFDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择实际寄出日期_面料">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="预计寄出日期_辅料" prop="PlanADate">
        <el-date-picker clearable
          v-model="queryParams.PlanADate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择预计寄出日期_辅料">
        </el-date-picker>
      </el-form-item>
      <el-form-item label="实际寄出日期_辅料" prop="ACTADate">
        <el-date-picker clearable
          v-model="queryParams.ACTADate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择实际寄出日期_辅料">
        </el-date-picker>
      </el-form-item>
<!--      <el-form-item label="预计开版" prop="PlanKBDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.PlanKBDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择预计开版">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="实际开版" prop="ACTKBDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.ACTKBDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择实际开版">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="预计开裁" prop="PlanKCDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.PlanKCDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择预计开裁">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="实际开裁" prop="ACTKCDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.ACTKCDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择实际开裁">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="预计外协回厂" prop="PlanWXDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.PlanWXDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择预计外协回厂">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="实际外协回厂" prop="ACTWXDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.ACTWXDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择实际外协回厂">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="预计针车" prop="PlanZCDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.PlanZCDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择预计针车">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="实际针车" prop="ACTZCDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.ACTZCDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择实际针车">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="针车工" prop="ZCUser">-->
<!--        <el-input-->
<!--          v-model="queryParams.ZCUser"-->
<!--          placeholder="请输入针车工"-->
<!--          clearable-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="预计完成日期_T" prop="PlanDoneDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.PlanDoneDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择预计完成日期_T">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
      <el-form-item label="实际完成日期_T" prop="ACTDoneDate">
        <el-date-picker clearable
          v-model="queryParams.ACTDoneDate"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择实际完成日期_T">
        </el-date-picker>
      </el-form-item>
<!--      <el-form-item label="抵达办公室日期" prop="DDOfficeDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.DDOfficeDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择抵达办公室日期">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="检验完成日期" prop="PlanQADate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.PlanQADate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择检验完成日期">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="实际检验日期" prop="ACTQADate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.ACTQADate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择实际检验日期">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="交货日期" prop="CustDeliveryDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.CustDeliveryDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择交货日期">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="交货周别" prop="CustDeliveryDateZB">-->
<!--        <el-input-->
<!--          v-model="queryParams.CustDeliveryDateZB"-->
<!--          placeholder="请输入交货周别"-->
<!--          clearable-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="预计寄件" prop="PlanSendCusDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.PlanSendCusDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择预计寄件">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="寄件周别" prop="YJZB">-->
<!--        <el-input-->
<!--          v-model="queryParams.YJZB"-->
<!--          placeholder="请输入寄件周别"-->
<!--          clearable-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="实际寄件日期" prop="sampleDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.sampleDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择实际寄件日期">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="实际寄件周别" prop="SJZB">-->
<!--        <el-input-->
<!--          v-model="queryParams.SJZB"-->
<!--          placeholder="请输入实际寄件周别"-->
<!--          clearable-->
<!--          @keyup.enter.native="handleQuery"-->
<!--        />-->
<!--      </el-form-item>-->
<!--      <el-form-item label="预计大底日期" prop="PlanDDDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.PlanDDDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择预计大底日期">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
<!--      <el-form-item label="实际大底日期" prop="ACTDDDate">-->
<!--        <el-date-picker clearable-->
<!--          v-model="queryParams.ACTDDDate"-->
<!--          type="date"-->
<!--          value-format="yyyy-MM-dd"-->
<!--          placeholder="请选择实际大底日期">-->
<!--        </el-date-picker>-->
<!--      </el-form-item>-->
      <el-form-item label="创建时间" prop="createTime">
        <el-date-picker clearable
          v-model="queryParams.createTime"
          type="date"
          value-format="yyyy-MM-dd"
          placeholder="请选择创建时间">
        </el-date-picker>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="getVexpDevelopsampleClothingProcessnewA(1)"
        >查看年实际完成数据</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="getVexpDevelopsampleClothingProcessnewA(2)"
        >查看季实际完成数据</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="getVexpDevelopsampleClothingProcessnewA(3)"
        >查看月实际完成数据</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="getVexpDevelopsampleClothingProcessnewA(4)"
        >查看周实际完成数据</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['system:Sample_Weekly_Report:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="Sample_Weekly_ReportList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
<!--      <el-table-column label="所属类别" align="center" prop="CategoryName" />-->
<!--      <el-table-column label="类别" align="center" prop="ZSZType" />-->
<!--      <el-table-column label="形体名称" align="center" prop="CnName" />-->
<!--      <el-table-column label="英文名称" align="center" prop="EnName" />-->
<!--      <el-table-column label="款号" align="center" prop="GoodsNo" />-->
<!--      <el-table-column label="阶段名称" align="center" prop="DevFtype" />-->
<!--      <el-table-column label="性别" align="center" prop="Sex" />-->
<!--      <el-table-column label="客户简称" align="center" prop="CustomerShortName" />-->
<!--      <el-table-column label="CustomerID" align="center" prop="CustomerID" />-->
<!--      <el-table-column label="商标" align="center" prop="Brand" />-->
<!--      <el-table-column label="工厂" align="center" prop="SupplierShortName" />-->
      <el-table-column label="部门" align="center" prop="deptName" />
<!--      <el-table-column label="QA" align="center" prop="FieldOA" />-->
<!--      <el-table-column label="是否DB" align="center" prop="ISDB" />-->
<!--      <el-table-column label="样品单号" align="center" prop="YPbillno" />-->
<!--      <el-table-column label="加工单价" align="center" prop="YPStockPrice" />-->
<!--      <el-table-column label="预告订单" align="center" prop="PlanOrder" />-->
<!--      <el-table-column label="量产月份" align="center" prop="PDMonth" />-->
<!--      <el-table-column label="配色" align="center" prop="SH" />-->
<!--      <el-table-column label="颜色" align="center" prop="CnColor" />-->
<!--      <el-table-column label="尺码" align="center" prop="SizeRule" />-->
<!--      <el-table-column label="主面料" align="center" prop="CnComposition" />-->
      <el-table-column label="下单日期" align="center" prop="SampleStartDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.SampleStartDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="接收日期" align="center" prop="RECDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.RECDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="预计制单下发" align="center" prop="PlanXFC" />
<!--      <el-table-column label="PlanSendCusDateC" align="center" prop="PlanSendCusDateC" />-->
      <el-table-column label="预计制单下发" align="center" prop="PLanXF" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.PLanXF, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="实际制单下发" align="center" prop="ACTXF" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.ACTXF, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="订单数量" align="center" prop="Num" />
      <el-table-column label="业务下发资材日期" align="center" prop="ZCDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.ZCDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="预计寄出日期_品质样" align="center" prop="PlanSendDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.PlanSendDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="实际寄出日期_品质样" align="center" prop="ACTQRDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.ACTQRDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="预计寄出日期_色样" align="center" prop="SYPlanDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.SYPlanDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="实际寄出日期_色样" align="center" prop="SYACTDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.SYACTDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="预计寄出日期_面料" align="center" prop="PlanFDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.PlanFDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="实际寄出日期_面料" align="center" prop="ACTFDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.ACTFDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="预计寄出日期_辅料" align="center" prop="PlanADate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.PlanADate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="实际寄出日期_辅料" align="center" prop="ACTADate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.ACTADate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="预计开版" align="center" prop="PlanKBDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.PlanKBDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="实际开版" align="center" prop="ACTKBDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.ACTKBDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="预计开裁" align="center" prop="PlanKCDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.PlanKCDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="实际开裁" align="center" prop="ACTKCDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.ACTKCDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="预计外协回厂" align="center" prop="PlanWXDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.PlanWXDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="实际外协回厂" align="center" prop="ACTWXDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.ACTWXDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="预计针车" align="center" prop="PlanZCDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.PlanZCDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="实际针车" align="center" prop="ACTZCDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.ACTZCDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="针车工" align="center" prop="ZCUser" />
      <el-table-column label="预计完成日期_T" align="center" prop="PlanDoneDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.PlanDoneDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="实际完成日期_T" align="center" prop="ACTDoneDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.ACTDoneDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="抵达办公室日期" align="center" prop="DDOfficeDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.DDOfficeDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="实收件数" align="center" prop="ACTNum" />
      <el-table-column label="检验完成日期" align="center" prop="PlanQADate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.PlanQADate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="实际检验日期" align="center" prop="ACTQADate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.ACTQADate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="检验合格数量" align="center" prop="QAHGNum" />
      <el-table-column label="交货日期" align="center" prop="CustDeliveryDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.CustDeliveryDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="交货周别" align="center" prop="CustDeliveryDateZB" />
      <el-table-column label="预计寄件" align="center" prop="PlanSendCusDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.PlanSendCusDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="寄件周别" align="center" prop="YJZB" />
      <el-table-column label="寄件数量" align="center" prop="PlanSendNum" />
      <el-table-column label="快递号" align="center" prop="KDNo" />
      <el-table-column label="实际寄件日期" align="center" prop="sampleDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.sampleDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="实际寄件周别" align="center" prop="SJZB" />
      <el-table-column label="状态" align="center" prop="Status" />
      <el-table-column label="业务备注说明" align="center" prop="BRemark" />
      <el-table-column label="追踪客人订单情况的反馈" align="center" prop="CusRemark" />
      <el-table-column label="预计大底日期" align="center" prop="PlanDDDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.PlanDDDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="实际大底日期" align="center" prop="ACTDDDate" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.ACTDDDate, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="大类" align="center" prop="CateGoryPName" />
      <el-table-column label="快递公司" align="center" prop="KDCompany" />
      <el-table-column label="${comment}" align="center" prop="creatorId" />
      <el-table-column label="制单人" align="center" prop="creator" />
      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
        </template>
      </el-table-column>
      <el-table-column label="年份" align="center" prop="YcreateTime" />
      <el-table-column label="周别" align="center" prop="ZcreateTime" />
      <el-table-column label="季节" align="center" prop="Season" />
      <el-table-column label="状态" align="center" prop="StatusDev" />
      <el-table-column label="不合格数量" align="center" prop="NACTNum" />
      <el-table-column label="设计类型" align="center" prop="LYType" />
      <el-table-column label="流水号" align="center" prop="BillNo" />
      <el-table-column label="备料员" align="center" prop="XLUser" />
      <el-table-column label="裁剪工" align="center" prop="cutter" />
      <el-table-column label="成型工" align="center" prop="CXUser" />
      <el-table-column label="后整理" align="center" prop="AfterFinishing" />
      <el-table-column label="订单类型" align="center" prop="OrderType" />
      <el-table-column label="打样单ID" align="center" prop="DevID" />
      <el-table-column label="纸板外发" align="center" prop="DBSupplier" />
      <el-table-column label="公司简称" align="center" prop="CompanyShortName" />
<!--      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!--          <template slot-scope="scope">-->
<!--            <el-button-->
<!--              size="mini"-->
<!--              type="text"-->
<!--              icon="el-icon-edit"-->
<!--              @click="handleUpdate(scope.row)"-->
<!--            >查询年数据</el-button>-->
<!--            <el-button-->
<!--              size="mini"-->
<!--              type="text"-->
<!--              icon="el-icon-edit"-->
<!--              @click="handleUpdate(scope.row)"-->
<!--            >查询季数据</el-button>-->
<!--            <el-button-->
<!--              size="mini"-->
<!--              type="text"-->
<!--              icon="el-icon-edit"-->
<!--              @click="handleUpdate(scope.row)"-->
<!--            >查询月数据</el-button>-->
<!--            <el-button-->
<!--              size="mini"-->
<!--              type="text"-->
<!--              icon="el-icon-edit"-->
<!--              @click="handleUpdate(scope.row)"-->
<!--            >查询周数据</el-button>-->
<!--          </template>-->
<!--      </el-table-column>-->
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改VIEW对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="所属类别" prop="CategoryName">
          <el-input v-model="form.CategoryName" placeholder="请输入所属类别" />
        </el-form-item>
        <el-form-item label="${comment}" prop="PurUser">
          <el-input v-model="form.PurUser" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="${comment}" prop="MakerName">
          <el-input v-model="form.MakerName" placeholder="请输入${comment}" />
        </el-form-item>
        <el-form-item label="形体名称" prop="CnName">
          <el-input v-model="form.CnName" placeholder="请输入形体名称" />
        </el-form-item>
        <el-form-item label="英文名称" prop="EnName">
          <el-input v-model="form.EnName" placeholder="请输入英文名称" />
        </el-form-item>
        <el-form-item label="款号" prop="GoodsNo">
          <el-input v-model="form.GoodsNo" placeholder="请输入款号" />
        </el-form-item>
        <el-form-item label="客户简称" prop="CustomerShortName">
          <el-input v-model="form.CustomerShortName" placeholder="请输入客户简称" />
        </el-form-item>
        <el-form-item label="CustomerID" prop="CustomerID">
          <el-input v-model="form.CustomerID" placeholder="请输入CustomerID" />
        </el-form-item>
        <el-form-item label="商标" prop="Brand">
          <el-input v-model="form.Brand" placeholder="请输入商标" />
        </el-form-item>
        <el-form-item label="工厂" prop="SupplierShortName">
          <el-input v-model="form.SupplierShortName" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="部门" prop="deptName">
          <el-input v-model="form.deptName" placeholder="请输入部门" />
        </el-form-item>
        <el-form-item label="QA" prop="FieldOA">
          <el-input v-model="form.FieldOA" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="是否DB" prop="ISDB">
          <el-input v-model="form.ISDB" placeholder="请输入是否DB" />
        </el-form-item>
        <el-form-item label="样品单号" prop="YPbillno">
          <el-input v-model="form.YPbillno" placeholder="请输入样品单号" />
        </el-form-item>
        <el-form-item label="加工单价" prop="YPStockPrice">
          <el-input v-model="form.YPStockPrice" placeholder="请输入加工单价" />
        </el-form-item>
        <el-form-item label="预告订单" prop="PlanOrder">
          <el-input v-model="form.PlanOrder" placeholder="请输入预告订单" />
        </el-form-item>
        <el-form-item label="量产月份" prop="PDMonth">
          <el-input v-model="form.PDMonth" placeholder="请输入量产月份" />
        </el-form-item>
        <el-form-item label="配色" prop="SH">
          <el-input v-model="form.SH" placeholder="请输入配色" />
        </el-form-item>
        <el-form-item label="颜色" prop="CnColor">
          <el-input v-model="form.CnColor" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="尺码" prop="SizeRule">
          <el-input v-model="form.SizeRule" placeholder="请输入尺码" />
        </el-form-item>
        <el-form-item label="主面料" prop="CnComposition">
          <el-input v-model="form.CnComposition" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="下单日期" prop="SampleStartDate">
          <el-date-picker clearable
            v-model="form.SampleStartDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择下单日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="接收日期" prop="RECDate">
          <el-date-picker clearable
            v-model="form.RECDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择接收日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="预计制单下发" prop="PlanXFC">
          <el-input v-model="form.PlanXFC" placeholder="请输入预计制单下发" />
        </el-form-item>
        <el-form-item label="PlanSendCusDateC" prop="PlanSendCusDateC">
          <el-input v-model="form.PlanSendCusDateC" placeholder="请输入PlanSendCusDateC" />
        </el-form-item>
        <el-form-item label="预计制单下发" prop="PLanXF">
          <el-date-picker clearable
            v-model="form.PLanXF"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择预计制单下发">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="实际制单下发" prop="ACTXF">
          <el-date-picker clearable
            v-model="form.ACTXF"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择实际制单下发">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="订单数量" prop="Num">
          <el-input v-model="form.Num" placeholder="请输入订单数量" />
        </el-form-item>
        <el-form-item label="业务下发资材日期" prop="ZCDate">
          <el-date-picker clearable
            v-model="form.ZCDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择业务下发资材日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="预计寄出日期_品质样" prop="PlanSendDate">
          <el-date-picker clearable
            v-model="form.PlanSendDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择预计寄出日期_品质样">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="实际寄出日期_品质样" prop="ACTQRDate">
          <el-date-picker clearable
            v-model="form.ACTQRDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择实际寄出日期_品质样">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="预计寄出日期_色样" prop="SYPlanDate">
          <el-date-picker clearable
            v-model="form.SYPlanDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择预计寄出日期_色样">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="实际寄出日期_色样" prop="SYACTDate">
          <el-date-picker clearable
            v-model="form.SYACTDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择实际寄出日期_色样">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="预计寄出日期_面料" prop="PlanFDate">
          <el-date-picker clearable
            v-model="form.PlanFDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择预计寄出日期_面料">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="实际寄出日期_面料" prop="ACTFDate">
          <el-date-picker clearable
            v-model="form.ACTFDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择实际寄出日期_面料">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="预计寄出日期_辅料" prop="PlanADate">
          <el-date-picker clearable
            v-model="form.PlanADate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择预计寄出日期_辅料">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="实际寄出日期_辅料" prop="ACTADate">
          <el-date-picker clearable
            v-model="form.ACTADate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择实际寄出日期_辅料">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="预计开版" prop="PlanKBDate">
          <el-date-picker clearable
            v-model="form.PlanKBDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择预计开版">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="实际开版" prop="ACTKBDate">
          <el-date-picker clearable
            v-model="form.ACTKBDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择实际开版">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="预计开裁" prop="PlanKCDate">
          <el-date-picker clearable
            v-model="form.PlanKCDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择预计开裁">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="实际开裁" prop="ACTKCDate">
          <el-date-picker clearable
            v-model="form.ACTKCDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择实际开裁">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="预计外协回厂" prop="PlanWXDate">
          <el-date-picker clearable
            v-model="form.PlanWXDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择预计外协回厂">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="实际外协回厂" prop="ACTWXDate">
          <el-date-picker clearable
            v-model="form.ACTWXDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择实际外协回厂">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="预计针车" prop="PlanZCDate">
          <el-date-picker clearable
            v-model="form.PlanZCDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择预计针车">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="实际针车" prop="ACTZCDate">
          <el-date-picker clearable
            v-model="form.ACTZCDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择实际针车">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="针车工" prop="ZCUser">
          <el-input v-model="form.ZCUser" placeholder="请输入针车工" />
        </el-form-item>
        <el-form-item label="预计完成日期_T" prop="PlanDoneDate">
          <el-date-picker clearable
            v-model="form.PlanDoneDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择预计完成日期_T">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="实际完成日期_T" prop="ACTDoneDate">
          <el-date-picker clearable
            v-model="form.ACTDoneDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择实际完成日期_T">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="抵达办公室日期" prop="DDOfficeDate">
          <el-date-picker clearable
            v-model="form.DDOfficeDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择抵达办公室日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="实收件数" prop="ACTNum">
          <el-input v-model="form.ACTNum" placeholder="请输入实收件数" />
        </el-form-item>
        <el-form-item label="检验完成日期" prop="PlanQADate">
          <el-date-picker clearable
            v-model="form.PlanQADate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择检验完成日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="实际检验日期" prop="ACTQADate">
          <el-date-picker clearable
            v-model="form.ACTQADate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择实际检验日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="检验合格数量" prop="QAHGNum">
          <el-input v-model="form.QAHGNum" placeholder="请输入检验合格数量" />
        </el-form-item>
        <el-form-item label="交货日期" prop="CustDeliveryDate">
          <el-date-picker clearable
            v-model="form.CustDeliveryDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择交货日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="交货周别" prop="CustDeliveryDateZB">
          <el-input v-model="form.CustDeliveryDateZB" placeholder="请输入交货周别" />
        </el-form-item>
        <el-form-item label="预计寄件" prop="PlanSendCusDate">
          <el-date-picker clearable
            v-model="form.PlanSendCusDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择预计寄件">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="寄件周别" prop="YJZB">
          <el-input v-model="form.YJZB" placeholder="请输入寄件周别" />
        </el-form-item>
        <el-form-item label="寄件数量" prop="PlanSendNum">
          <el-input v-model="form.PlanSendNum" placeholder="请输入寄件数量" />
        </el-form-item>
        <el-form-item label="快递号" prop="KDNo">
          <el-input v-model="form.KDNo" placeholder="请输入快递号" />
        </el-form-item>
        <el-form-item label="实际寄件日期" prop="sampleDate">
          <el-date-picker clearable
            v-model="form.sampleDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择实际寄件日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="实际寄件周别" prop="SJZB">
          <el-input v-model="form.SJZB" placeholder="请输入实际寄件周别" />
        </el-form-item>
        <el-form-item label="业务备注说明" prop="BRemark">
          <el-input v-model="form.BRemark" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="追踪客人订单情况的反馈" prop="CusRemark">
          <el-input v-model="form.CusRemark" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="${comment}" prop="id">
          <el-input v-model="form.id" placeholder="请输入${comment}" />
        </el-form-item>
        <el-form-item label="预计大底日期" prop="PlanDDDate">
          <el-date-picker clearable
            v-model="form.PlanDDDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择预计大底日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="实际大底日期" prop="ACTDDDate">
          <el-date-picker clearable
            v-model="form.ACTDDDate"
            type="date"
            value-format="yyyy-MM-dd"
            placeholder="请选择实际大底日期">
          </el-date-picker>
        </el-form-item>
        <el-form-item label="大类" prop="CateGoryPName">
          <el-input v-model="form.CateGoryPName" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="快递公司" prop="KDCompany">
          <el-input v-model="form.KDCompany" type="textarea" placeholder="请输入内容" />
        </el-form-item>
        <el-form-item label="${comment}" prop="creatorId">
          <el-input v-model="form.creatorId" placeholder="请输入${comment}" />
        </el-form-item>
        <el-form-item label="制单人" prop="creator">
          <el-input v-model="form.creator" placeholder="请输入制单人" />
        </el-form-item>
        <el-form-item label="年份" prop="YcreateTime">
          <el-input v-model="form.YcreateTime" placeholder="请输入年份" />
        </el-form-item>
        <el-form-item label="周别" prop="ZcreateTime">
          <el-input v-model="form.ZcreateTime" placeholder="请输入周别" />
        </el-form-item>
        <el-form-item label="季节" prop="Season">
          <el-input v-model="form.Season" placeholder="请输入季节" />
        </el-form-item>
        <el-form-item label="状态" prop="StatusDev">
          <el-input v-model="form.StatusDev" placeholder="请输入状态" />
        </el-form-item>
        <el-form-item label="不合格数量" prop="NACTNum">
          <el-input v-model="form.NACTNum" placeholder="请输入不合格数量" />
        </el-form-item>
        <el-form-item label="流水号" prop="BillNo">
          <el-input v-model="form.BillNo" placeholder="请输入流水号" />
        </el-form-item>
        <el-form-item label="备料员" prop="XLUser">
          <el-input v-model="form.XLUser" placeholder="请输入备料员" />
        </el-form-item>
        <el-form-item label="裁剪工" prop="cutter">
          <el-input v-model="form.cutter" placeholder="请输入裁剪工" />
        </el-form-item>
        <el-form-item label="成型工" prop="CXUser">
          <el-input v-model="form.CXUser" placeholder="请输入成型工" />
        </el-form-item>
        <el-form-item label="后整理" prop="AfterFinishing">
          <el-input v-model="form.AfterFinishing" placeholder="请输入后整理" />
        </el-form-item>
        <el-form-item label="打样单ID" prop="DevID">
          <el-input v-model="form.DevID" placeholder="请输入打样单ID" />
        </el-form-item>
        <el-form-item label="纸板外发" prop="DBSupplier">
          <el-input v-model="form.DBSupplier" placeholder="请输入纸板外发" />
        </el-form-item>
        <el-form-item label="公司简称" prop="CompanyShortName">
          <el-input v-model="form.CompanyShortName" type="textarea" placeholder="请输入内容" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  listSample_Weekly_Report,
  getSample_Weekly_Report,
  delSample_Weekly_Report,
  addSample_Weekly_Report,
  updateSample_Weekly_Report,
  getVexpDevelopsampleClothingProcessnewAList
} from '@/api/system/Sample_Weekly_Report'

export default {
  name: "Sample_Weekly_Report",
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // VIEW表格数据
      Sample_Weekly_ReportList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        CategoryName: null,
        ZSZType: null,
        CnName: null,
        GoodsNo: null,
        DevFtype: null,
        SupplierShortName: null,
        deptName: null,
        YPbillno: null,
        SampleStartDate: null,
        RECDate: null,
        PLanXF: null,
        ACTXF: null,
        ZCDate: null,
        PlanSendDate: null,
        ACTQRDate: null,
        SYPlanDate: null,
        SYACTDate: null,
        PlanFDate: null,
        ACTFDate: null,
        PlanADate: null,
        ACTADate: null,
        PlanKBDate: null,
        ACTKBDate: null,
        PlanKCDate: null,
        ACTKCDate: null,
        PlanWXDate: null,
        ACTWXDate: null,
        PlanZCDate: null,
        ACTZCDate: null,
        ZCUser: null,
        PlanDoneDate: null,
        ACTDoneDate: null,
        DDOfficeDate: null,
        PlanQADate: null,
        ACTQADate: null,
        CustDeliveryDate: null,
        CustDeliveryDateZB: null,
        PlanSendCusDate: null,
        YJZB: null,
        sampleDate: null,
        SJZB: null,
        Status: null,
        PlanDDDate: null,
        ACTDDDate: null,
        CateGoryPName: null,
        createTime: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        YWP: [
          { required: true, message: "$comment不能为空", trigger: "blur" }
        ],
        CGP: [
          { required: true, message: "$comment不能为空", trigger: "blur" }
        ],
        SCP: [
          { required: true, message: "$comment不能为空", trigger: "blur" }
        ],
        PurUser: [
          { required: true, message: "$comment不能为空", trigger: "blur" }
        ],
        ACTNum: [
          { required: true, message: "实收件数不能为空", trigger: "blur" }
        ],
        id: [
          { required: true, message: "$comment不能为空", trigger: "blur" }
        ],
        DevID: [
          { required: true, message: "打样单ID不能为空", trigger: "blur" }
        ],
      }
    };
  },
  created() {
    this.getList();
  },
  methods: {
    /** 查询VIEW列表 */
    getList() {
      this.loading = true;
      listSample_Weekly_Report(this.queryParams).then(response => {
        this.Sample_Weekly_ReportList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        YWP: null,
        CGP: null,
        SCP: null,
        APuruser: null,
        SupCZId: null,
        SupCZ: null,
        VerUserName: null,
        CategoryName: null,
        ZSZType: null,
        PurUser: null,
        MakerName: null,
        CnName: null,
        EnName: null,
        GoodsNo: null,
        DevFtype: null,
        Sex: null,
        CustomerShortName: null,
        CustomerID: null,
        Brand: null,
        SupplierShortName: null,
        SupplierID: null,
        deptName: null,
        deptId: null,
        FieldOA: null,
        ISDB: null,
        YPbillno: null,
        YPStockPrice: null,
        PlanOrder: null,
        PDMonth: null,
        SH: null,
        CnColor: null,
        SizeRule: null,
        CnComposition: null,
        SampleStartDate: null,
        RECDate: null,
        PlanXFC: null,
        PlanSendCusDateC: null,
        SYPlanDateC: null,
        PlanFDateC: null,
        PlanADateC: null,
        PlanKBDateC: null,
        PlanKCDateC: null,
        PlanWXDateC: null,
        PlanZCDateC: null,
        PlanDoneDateC: null,
        PlanDDDateC: null,
        PLanXF: null,
        ACTXF: null,
        Num: null,
        ZCDate: null,
        PlanSendDate: null,
        ACTQRDate: null,
        SYPlanDate: null,
        SYACTDate: null,
        PlanFDate: null,
        ACTFDate: null,
        PlanADate: null,
        ACTADate: null,
        PlanKBDate: null,
        ACTKBDate: null,
        PlanKCDate: null,
        ACTKCDate: null,
        PlanWXDate: null,
        ACTWXDate: null,
        PlanZCDate: null,
        ACTZCDate: null,
        ZCUser: null,
        PlanDoneDate: null,
        ACTDoneDate: null,
        DDOfficeDate: null,
        ACTNum: null,
        PlanQADate: null,
        ACTQADate: null,
        QAHGNum: null,
        CustDeliveryDate: null,
        CustDeliveryDateZB: null,
        PlanSendCusDate: null,
        YJZB: null,
        PlanSendNum: null,
        KDNo: null,
        sampleDate: null,
        SJZB: null,
        Status: null,
        BRemark: null,
        CusRemark: null,
        id: null,
        PlanDDDate: null,
        ACTDDDate: null,
        CateGoryPName: null,
        KDCompany: null,
        creatorId: null,
        creator: null,
        createTime: null,
        YcreateTime: null,
        ZcreateTime: null,
        Season: null,
        StatusDev: null,
        NACTNum: null,
        Country: null,
        LYType: null,
        BillNo: null,
        XLUser: null,
        cutter: null,
        CXUser: null,
        AfterFinishing: null,
        OrderType: null,
        DevID: null,
        DBSupplier: null,
        CompanyShortName: null
      };
      this.resetForm("form");
    },
    getVexpDevelopsampleClothingProcessnewA(row){
      console.log(row)
      getVexpDevelopsampleClothingProcessnewAList({type: row}).then(response =>{
        this.Sample_Weekly_ReportList = response.rows;
        this.total = response.total;
        this.loading = false;
      })
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.YWP)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加VIEW";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const YWP = row.YWP || this.ids
      getSample_Weekly_Report(YWP).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改VIEW";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.YWP != null) {
            updateSample_Weekly_Report(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addSample_Weekly_Report(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const YWPs = row.YWP || this.ids;
      this.$modal.confirm('是否确认删除VIEW编号为"' + YWPs + '"的数据项？').then(function() {
        return delSample_Weekly_Report(YWPs);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('system/Sample_Weekly_Report/export', {
        ...this.queryParams
      }, `Sample_Weekly_Report_${new Date().getTime()}.xlsx`)
    }
  }
};
</script>
